package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class MemberList implements Representation {

    private int beginIndex;
    private int endIndex;
    private List<AttributeDefinition> memberList;

    public MemberList(int beginIndex, int endIndex, List<AttributeDefinition> memberList) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.memberList = memberList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return memberList.size();
    }

    public AttributeDefinition get(int index) {
        return memberList.get(index);
    }

}
